#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 15;

int n;
ll a[N];
ll b[N];
unordered_set<ll> st;
void dfs(int i, int sz) {
  if (i == n + 1) {
    ll ans = 0;
    rep(j, 1, sz) ans ^= b[j];
    st.insert(ans);
    return;
  }
  rep(j, 1, sz) {
    b[j] += a[i];
    dfs(i + 1, sz);
    b[j] -= a[i];
  }
  b[sz + 1] += a[i];
  dfs(i + 1, sz + 1);
  b[sz + 1] -= a[i];
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) cin >> a[i];
  dfs(1, 0);
  cout << st.size();
  return 0;
}